import abscmdaction from "./abscmdaction";
import cmdenums from "./cmdenums";
import mirroraction from "./editaction/mirroraction";
import rotateaction from "./editaction/rotateaction";
import extendlineaction from "./editaction/extendlineaction";
import translateaction from "./editaction/translateaction";
import { ScaleCMDAction } from "./editaction/scaleaction";
class EditCmdAction extends abscmdaction.ABSCmdAction {
    constructor() {
        super();
    }

    getCurentAction(type) {
        let subaction = null;
        switch (type) {
            case cmdenums.EditCmdType.mirror:
                subaction = new mirroraction.MirrorEditAction();
                break;

            case cmdenums.EditCmdType.rotate:
                subaction = new rotateaction.RotateEditAction();
                break;

            case cmdenums.EditCmdType.extend:
                subaction = new extendlineaction.ExtendLineAction();
                break;

            case cmdenums.EditCmdType.translate:
                subaction = new translateaction.TranslateAction();
                break;

            case cmdenums.EditCmdType.scale:
                subaction = new ScaleCMDAction();
                break;
        }

        return subaction;
    }
}

export default { EditCmdAction }